package com.zsc.oj.mapper;

import com.zsc.oj.model.entity.AcceptQuestion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zsc.oj.model.vo.AcceptQuestionVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Entity com.zsc.oj.model.entity.AcceptQuestion
 */
public interface AcceptQuestionMapper extends BaseMapper<AcceptQuestion> {
    @Select("select userId, count(*) as num from accept_question group by userId order by num desc")
    List<AcceptQuestionVO> listRank();
}




